package com.hqq.concurrency.balking;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * App
 * Created by heqianqian on 2017/7/30.
        */
public class App {

    public static void main(String... args) {
        final WashingMachine washingMachine = new WashingMachine();
        ExecutorService executorService = Executors.newFixedThreadPool(3);
        executorService.execute(washingMachine::wash);
        executorService.execute(washingMachine::wash);
        executorService.execute(washingMachine::wash);
        executorService.shutdown();
    }
}
